package 方法和构造函数引用;

import java.util.function.Supplier;

interface PersonFactory<P extends Person> {
    P create(String firstName, String lastName);

    public static void main(String[] args) {
        PersonFactory<Person> personFactory = Person::new;
        Supplier<Person> personSupplier = Person::new;

        Person person = personFactory.create("Peter", "Parker");
    }
}